/*
 * Copyright (c) 2015-2018 Sfkj Science And Technology Co.,Ltd.
 * All Rights Reserved.
 * This software is the confidential and proprietary information of
 * Sfkj Science And Technology Co.,Ltd.
 * ("Confidential Information").You shall not
 * disclose such Confidential Information and shall use it only in
 * accordance with the terms of the license agreement you entered into
 * with Sfkj.
 */
package com.sfkj.walk.api.user;

import com.sfkj.walk.axon.web.AbstractCommandGatewayController;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.axonframework.commandhandling.TargetAggregateIdentifier;
import org.hibernate.validator.constraints.NotBlank;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

import static com.sfkj.walk.axon.web.WebContants.API_PREFIX;

@Data
@EqualsAndHashCode(callSuper = false)
@RestController
@RequestMapping(API_PREFIX + "/user/registerPhoneUser")
public class RegisterPhoneUserCommand extends AbstractCommandGatewayController<RegisterPhoneUserCommand> implements java.io.Serializable {

    private static final long serialVersionUID = 223516524838419577L;

    @TargetAggregateIdentifier
    private String id;
    @NotNull
    private String captcha;
    @NotBlank
    @Size(min = 11, max = 11)
    private String phone;
    @NotBlank
    @Size(min = 3)
    private String password;
    private String name;
    private String introduction;

}